using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class Manufacturer2Map : EntityTypeConfiguration<Manufacturer2>
    {
        public Manufacturer2Map()
        {
            // Primary Key
            this.HasKey(t => t.MID);

            // Properties
            this.Property(t => t.MName)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Manufacturer2");
            this.Property(t => t.MID).HasColumnName("MID");
            this.Property(t => t.HospitalID).HasColumnName("HospitalID");
            this.Property(t => t.MName).HasColumnName("MName");
        }
    }
}
